
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>CreateTime: 2006-4-13 </p>
 * @author pengz
 * @version 1.0
 */


package cn.agiledata.bank.myspace.bean;

import java.util.Date;

import cn.agiledata.bank.account.dao.hibernate.HibernateAccountDAO;
import cn.agiledata.bank.common.dao.BankTemplate;
import cn.agiledata.bank.common.dao.SysTemplate;
import cn.agiledata.bank.common.util.Constant;
import cn.agiledata.bank.common.util.DateUtil;
import cn.agiledata.bank.common.util.ForeDict;
import cn.agiledata.bank.common.util.OperateUtil;
import cn.agiledata.bank.common.util.StringUtil;
import cn.agiledata.bank.common.util.WeatherUtil;
import cn.agiledata.bank.hibernateBean.Account;
import cn.agiledata.bank.hibernateBean.AccountBank;
import cn.agiledata.bank.hibernateBean.BankInfo;
import cn.agiledata.bank.hibernateBean.CityInfo;
import cn.agiledata.bank.hibernateBean.SysParameter;
import cn.agiledata.bank.hibernateBean.Transaction;
import cn.agiledata.bank.myspace.service.IMySpaceService;
import cn.agiledata.bank.transaction.service.FeeRatioInterf;
import com.vnv.infrastructure.logic.IPBAppFactory;
import com.vnv.infrastructure.logic.IPBMgrFactory;

public class AccountHisQueryDetailBean implements Constant {
	
	Account a =null;
	Transaction t =null;
	AccountBank ab = null;
	BankInfo bi = null;
	CityInfo prov = null;
	CityInfo city = null;
		
		public AccountHisQueryDetailBean (){}
		public AccountHisQueryDetailBean (Account a,Transaction t){
			this.a=a;
			this.t=t;
			
			String accountBankSeq = t.getAccountBankSeq();
			
			if(accountBankSeq != null)
				this.ab = (AccountBank)getMySpaceService().getAccountBank(accountBankSeq);
			
			
			if(t.getBankSeq() != null)
				this.bi = getBankTemplate().getBankInfo(t.getBankSeq().toString());
			
			
			if(t.getBankProvSeq() != null)
				this.prov = getAccountDAO().getCityInfoById(t.getBankProvSeq().toString());
			if(t.getBankCitySeq() != null)
				this.city = getAccountDAO().getCityInfoById(t.getBankCitySeq().toString());
			
		}
		
		/**
		 * 
		 * @return
		 */
		public IMySpaceService getMySpaceService() {
			IMySpaceService service = (IMySpaceService)IPBAppFactory.getObj("mySpaceService");
			return service;
		}
		
		public BankTemplate getBankTemplate() {
			BankTemplate bt = (BankTemplate)IPBAppFactory.getObj("bankTemplate");
			return bt;
		}
		
		public HibernateAccountDAO getAccountDAO() {
			HibernateAccountDAO ao = (HibernateAccountDAO)IPBAppFactory.getObj("accountDAO");
			return ao;
		}
		
		public SysTemplate getSysTemplate() {
			SysTemplate sysTemplate = (SysTemplate)IPBAppFactory.getObj("sysTemplate");
			return sysTemplate;
		}
		
		private String Aid;
		private String tid;
		private String orderId;		//商户订单号
		private String transId;		//交易号
		private String fromAccountName;
		private String fromAccountEmail;
		private String fromSubAccountName;
		private String toAccountName;
		private String toAccountEmail;
		private String toSubAccountName;
		private String actionTypeName;
		private String actionType;
		private String amount;
		private String fee;
		private String payMode;
		private String realTrasAmount;
		private String transStatus;
		private String tradeType;
		private String beginDate;
		private String endDate;
		private String updateDate;
		private String femark;
		private String bank; //银行
		private String cardNo; //卡号
		private String directBank; //帐户直付的银行
		private String directCardNo; //帐户直付的卡号
		private String personName;	//收款人姓名
		private String personMail;//收款人email
		private String personPhone;//收款人电话
		private String personMobile; //收款人手机
		private String bankProv;	//开户行省份
		private String bankCity;	//开户行城市
		private String bankName;	//开户支行名称
		private String accountType;	//客户类型
		private String auditTrans;	//审核状态
		private String voucherCode;	//回单号
		private String voucherCodeShow;	//是否显示回单号
        private String purpose;//资金用途
        private String sellerUrl;//
        private Double returnAmount; //部分退款 退款金额
		

		public Double getReturnAmount() {
			return t.getReturnAmount();
		}
		public void setReturnAmount(Double returnAmount) {
			this.returnAmount = returnAmount;
		}
		public String getOrderId() {
			return t.getOrderId();
		}
		public void setOrderId(String orderId) {
			this.orderId = orderId;
		}
		
        public String getSellerUrl() {
			return t.getSellerUrl();
		}
		public void setSellerUrl(String sellerUrl) {
			this.sellerUrl = sellerUrl;
		}
		public String getPurpose() {
            return t.getPurpose();
        }
        public void setPurpose(String purpose) {
            this.purpose = purpose;
        }
        public String getAccountType() {
			return a.getAccountType();
		}
		public void setAccountType(String accountType) {
			this.accountType = accountType;
		}
		public String getDirectBank() {
			return bi == null?"":bi.getBankName();
		}
		public void setDirectBank(String directBank) {
			this.directBank = directBank;
		}
		
		public String getAuditTrans() {
			return t.getAuditTrans();
		}
		public void setAuditTrans(String auditTrans) {
			this.auditTrans = auditTrans;
		}

		public String getVoucherCode() {
			if(StringUtil.isStrEmpty(t.getVoucherCode())) {
				return "";
			} else {
				return t.getVoucherCode().substring(4);
			}
		}
		public void setVoucherCode(String voucherCode) {
			this.voucherCode = voucherCode;
		}

		public String getVoucherCodeShow() {
			
			//没有回单号,但是满足要求的也显示出来
			if(t.getDebit().getAccount().getAccountType().equals(Constant.ACCOUNT_TYPE_CORPORATION) 
				|| 
				t.getCredit().getAccount().getAccountType().equals(Constant.ACCOUNT_TYPE_CORPORATION) ) {	//企业客户
				if(!StringUtil.isStrEmpty(t.getVoucherCode())) {	//有回单号的话
					return EXIST_VOUCHER_CODE;
				}
				
				if (getActionType().equals(Constant.ACTION_TYPE_B)
					|| getActionType().equals(Constant.ACTION_TYPE_C)
					|| getActionType().equals(Constant.ACTION_TYPE_A)
					|| getActionType().equals(Constant.ACTION_TYPE_F)
					|| getActionType().equals(Constant.ACTION_TYPE_K)
					|| getActionType().equals(Constant.ACTION_TYPE_L)
					|| getActionType().equals(Constant.ACTION_TYPE_O)
					|| getActionType().equals(Constant.ACTION_TYPE_P)
					|| getActionType().equals(Constant.ACTION_TYPE_Q)) { // 线下充值,账户间交易,B2C网上银行充值,B2C网上银行消费,B2C电话银行充值,B2C电话银行消费,B2B网上银行充值,B2B网上银行消费,卡消费
					if (getTransStatus().equals(
						Constant.TRANS_STATUS_TRANSACTIONSUCCESS)) { // 交易成功
						return NOT_EXIST_VOUCHER_CODE;
					}
				}
				if (getActionType().equals(Constant.ACTION_TYPE_D)
					|| getActionType().equals(Constant.ACTION_TYPE_G)) { // 提现,内部账户付款给对方银行
					if (getAuditTrans().equals(Constant.TRANSACTION_AUDIT_STATUS)) { // 已审核
						return NOT_EXIST_VOUCHER_CODE;
					}
				}				
			}
			return DENY_GET_VOUCHER_CODE;
		}
		public void setVoucherCodeShow(String voucherCodeShow) {
			this.voucherCodeShow = voucherCodeShow;
		}
		/**
		 * 得到银行
		 * @return
		 */
		public String getBank() {
			return ab.getBankInfo().getBankName();
		}
		public void setBank(String bank) {
			this.bank = bank;
		}


		public void setActionTypeName(String actionTypeName) {
			this.actionTypeName = actionTypeName;
		}
		public void setAid(String aid) {
			Aid = aid;
		}
		public void setAmount(String amount) {
			this.amount = amount;
		}
		public void setBeginDate(String beginDate) {
			this.beginDate = beginDate;
		}
		public void setEndDate(String endDate) {
			this.endDate = endDate;
		}
		public void setFee(String fee) {
			this.fee = fee;
		}
		public void setFemark(String femark) {
			this.femark = femark;
		}
		public void setFromAccountEmail(String fromAccountEmail) {
			this.fromAccountEmail = fromAccountEmail;
		}
		public void setFromAccountName(String fromAccountName) {
			this.fromAccountName = fromAccountName;
		}
		public void setFromSubAccountName(String fromSubAccountName) {
			this.fromSubAccountName = fromSubAccountName;
		}
		public void setPayMode(String payMode) {
			this.payMode = payMode;
		}
		public void setRealTrasAmount(String realTrasAmount) {
			this.realTrasAmount = realTrasAmount;
		}
		public void setTid(String tid) {
			tid = tid;
		}
		public void setToAccountEmail(String toAccountEmail) {
			this.toAccountEmail = toAccountEmail;
		}
		public void setToAccountName(String toAccountName) {
			this.toAccountName = toAccountName;
		}
		public void setToSubAccountName(String toSubAccountName) {
			this.toSubAccountName = toSubAccountName;
		}
		public void setTradeType(String tradeType) {
			this.tradeType = tradeType;
		}
		public void setTransId(String transId) {
			this.transId = transId;
		}
		public void setTransStatus(String transStatus) {
			this.transStatus = transStatus;
		}
		public String getAid() {
			return a.getId()+"";
		}
		public String getTid() {
			return t.getId()+"";
		}

//		交易号		
		public String getTransId() {
			return t.getTransId();
		}
		
		public String getFromAccountEmail() {
			return "";
		}
		public String getFromAccountName() {
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_A) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_O)) { //充值
				
				return ((BankInfo)getBankTemplate().getBankInfo(t.getBankSeq().toString())).getBankName();
			} else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_B)) { //线下充值
				if(t.getBankSeq() != null) { //���л��银行汇款,卡到账户
					BankInfo bi = (BankInfo)getBankTemplate().getBankInfo(t.getBankSeq().toString());
					if(bi != null) {
						//bi.getBankName()是银行名称，t.getBankName()是开户行名称，t.getCardNo()是卡号，只有企业账户的银行汇款充值才有汇款人名称和卡号两项
						if(t.getBankName() != null)
							return bi.getBankName()+"("+t.getBankName()+")";	
						else  {
							return bi.getBankName();
						}
					} else {
						return "";
					}
				} else { //邮局汇款
					return "邮局";
				}
			}else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C) ||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_D)||	
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_G)||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_H)||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Y) ||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_R)) {	//账户间交易,提现,支付账户付款给对方银行,内部帐户转帐，账户到卡
				if(StringUtil.isStrEmpty(t.getDebit().getAccount().getEmail())) {
					return WeatherUtil.getNameOrEmailOrMobileByAccount(t.getDebit().getAccount())+"("+t.getDebit().getAccount().getMobile()+")";
				} else {
					return WeatherUtil.getNameOrEmailOrMobileByAccount(t.getDebit().getAccount())+"("+t.getDebit().getAccount().getEmail()+")";
				}
			} else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_F) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Q)) {	//银行付款给对方账户,卡付款
				if(t.getPersonName() != null) {
					return "姓名:"+t.getPersonName();
				} else {
					BankTemplate bt = (BankTemplate)IPBAppFactory.getObj("bankTemplate");
					return ((BankInfo)bt.getBankInfo(t.getBankSeq().toString())).getBankName();
				}
			} else if (t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_X)) {	//卡到账户
				if (t.getCardNo() != null) {
					return "卡卡号：" + t.getCardNo();
				} else {
					return "卡卡号不详";
				}
			} else {
				return "";
			}
		}
		public String getFromSubAccountName() {
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C) ||
			   t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_D) ||	
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_G)||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_H)||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Y) ||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_R)) {	//账户间交易,提现,账户付款给对方银行,内部帐户转帐,账户到卡
				return Constant.SUBACCOUNT_TITLE+t.getDebit().getAccountName();
			} else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_F) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Q)) {	//银行付款给对方账户,卡付款
//				BankTemplate bt = (BankTemplate)IPBAppFactory.getObj("bankTemplate");
//				return "通过"+((BankInfo)bt.getBankInfo(t.getBankSeq().toString())).getBankName()+"支付";
				return "";
			} else {
				return "";
			}
		}

		public String getToAccountEmail() {
			return "";
		}
		public String getToAccountName() {
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_A) ||
			  t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_B) ||	
			   t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C) ||
			   t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_F) ||
			   t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_O)	||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_H) ||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_X) ||
				t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Q)
				) {	//充值,线下充值,账户间交易,银行付款给对方账户,内部帐户转帐,卡到账户,卡付款
				if(StringUtil.isStrEmpty(t.getCredit().getAccount().getEmail())) {
					return WeatherUtil.getNameOrEmailOrMobileByAccount(t.getCredit().getAccount())+"("+t.getCredit().getAccount().getMobile()+")";
				} else {
					return WeatherUtil.getNameOrEmailOrMobileByAccount(t.getCredit().getAccount())+"("+t.getCredit().getAccount().getEmail()+")";
				}
			} else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_D) ) {	//提现
				if(t.getAccountBankSeq() != null) {
					String accountBankSeq = t.getAccountBankSeq();
					AccountBank ab = (AccountBank)getMySpaceService().getAccountBank(accountBankSeq);
					return ab.getAccountName();
				} else {
					if(t.getPersonName() != null) {
						return t.getPersonName();
					} else {
						return "";
					}					
				}
			}	else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_G)) {	//账户付款给对方银行
				if(t.getPersonName() != null) {
					return t.getPersonName();
				} else {
					return "";
				}
			} else if (t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Y)) {	//账户到卡
				if (t.getCardNo() != null) {
					return "卡卡号：" + t.getCardNo();
				} else {
					return "卡卡号不详";
				}
			} else if (t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_R)) {	//退款
				if(t.getBankSeq() != null) {
					Long lBankId = t.getBankSeq();
					BankInfo bi = (BankInfo)getBankTemplate().getBankById(lBankId);
					return bi.getBankName();
				} else {
					if(t.getPersonName() != null) {
						return t.getPersonName();
					} else {
						return "";
					}					
				}
			} else {
				return "";
			}
		
		}
		public String getToSubAccountName() {
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_A) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_B) ||	
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_F) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_O)	||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_H) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_X) ||
					t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_Q)) {	//充值,线下充值,账户间交易,银行付款给对方账户,内部帐户转帐,卡到账户,卡付款	
				return Constant.SUBACCOUNT_TITLE+t.getCredit().getAccountName();
			}	else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_D)) {	//提现
				if(t.getAccountBankSeq() != null) {
					String accountBankSeq = t.getAccountBankSeq();
					
					AccountBank ab = (AccountBank)getMySpaceService().getAccountBank(accountBankSeq);
					return "银行卡号:"+ab.getAccountId()+"("+ab.getBankInfo().getBankName()+")";
				} else {
					Long bankSeq = t.getBankSeq();
					
					BankInfo bi = (BankInfo)getMySpaceService().getBankInfo(bankSeq.toString());
					return "银行卡号:"+t.getCardNo()+"("+bi.getBankName()+")";				
				}
			} else if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_G)) {	//账户付款给对方银行
				Long bankSeq = t.getBankSeq();
				
				BankInfo bi = (BankInfo)getMySpaceService().getBankInfo(bankSeq.toString());
				return "银行卡号:"+t.getCardNo()+"("+bi.getBankName()+")";		
			} else {
				return "";
			}
		}
		
//		操作类型
		public String getActionTypeName() {
			return t.getActionType().getActionName();
		}



//		交易状态
		public String getTransStatus() {
			return t.getTransStatus();
		}
		
//		付款类型(收/付)
		public String getPayMode() {
			if(t.getAmount().doubleValue() >= 0) {
				if(t.getCredit().getAccount().getId().equals(a.getId())) return "收";
				else return "付";
			} else {
				if(t.getCredit().getAccount().getId().equals(a.getId())) return "付";
				else return "收";				
			}
		}
//		操作金额		
		public String getAmount() {
			//2007-12-5由zxj修改，返回交易金额的绝对值
			double d = Math.abs(t.getAmount().doubleValue());
			if (t.getAmount().doubleValue() < 0) 
				return "-" + OperateUtil.parseDec(new Double(d),"######0.00");
			else 
				return OperateUtil.parseDec(new Double(d),"######0.00");
		}
//		费用		
		public String getFee(){
			//2007-12-5由zxj修改，新增计算账户间交易非最终状态(非交易成功，非退款成功，非交易失败，非交易取消)下的收款方手续费
			//并且不管是收款方手续费还是付款方手续费，返回值都是取手续费的绝对值
			Double transFee = null;
			if(t.getCredit().getAccount().getId().equals(a.getId())) transFee = this.getCreditFee();
			else transFee = t.getDebitFee();
			
			double d = Math.abs(transFee.doubleValue());
			return String.valueOf(d);
		}
		
		//2007-12-5由zxj新增，计算账户间交易非最终状态(非交易成功，非退款成功，非交易失败，非交易取消)下的收款方手续费
		private Double getCreditFee() {
			//交易类型：账户间交易
			if (Constant.ACTION_TYPE_C.equals(t.getActionType().getId().toString())) {
				if (!Constant.TRANS_STATUS_TRANSACTIONSUCCESS.equals(t.getTransStatus()) && 
					!Constant.TRANS_STATUS_REFUNDSUCC.equals(t.getTransStatus()) && 
					!Constant.TRANS_STATUS_TRANSACTIONFAIL.equals(t.getTransStatus()) && 
					!Constant.TRANS_STATUS_TRANSACTIONCLOSE.equals(t.getTransStatus())) {
					//交易状态为：除了最终状态(交易成功，退款成功，交易失败，交易取消)的所有状态
					//在非最终状态下并未实际发生向收款方收取手续费的动作，因此其t.getCreditFee()均为0；
					//为了展现非最终状态下假设交易成功收款方需要付出的手续费，只能在此处重新计算creditFee
					double creditFee = getFeeRatioService().getCreditFee(null, t.getCredit().getAccount(),
							Constant.ACTION_TYPE_C, t.getAmount());
					return new Double(creditFee);
				}
			}
			
			return t.getCreditFee();
		}
		
		private FeeRatioInterf getFeeRatioService() {
			return (FeeRatioInterf) IPBMgrFactory.getMgr(ForeDict.SERVICE_FEE_RATIO);
		}
		
		public String getRealTrasAmount() {
//			if (t.getCredit().getAccount().getId().equals(a.getId())) {
//			}else{
//			return (t.getAmount().doubleValue() + new Double(getFee()).doubleValue())+"";
//		}
			boolean add = false;
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C)) {	//如果是担保交易,付款方的手续费是外扣的
				if (t.getDebit().getAccount().getId().equals(a.getId())) {
					add = true;
				}
			}
			
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_D) || (t.getActionType().equals(Constant.ACTION_TYPE_G))) {	//如果是提现或者账户付款给对方银行,取现时收费模式=1是外扣,=2是内扣
				
				SysParameter feeMode = getSysTemplate().getWithDrawFee(t.getCredit().getId());
				String withdraw_fee = feeMode.getParmValue();
				if(withdraw_fee.equals(Constant.WITHDRAW_FEE_FRIST)) {
					add = true;
				}
			}
			
			if(add) {
				return OperateUtil.parseDec(new Double(Math.abs(t.getAmount().doubleValue()) + new Double(getFee()).doubleValue()),"#######.00");
				//(t.getAmount().doubleValue() + new Double(getFee()).doubleValue())+"";
			} else {
				return OperateUtil.parseDec(new Double(Math.abs(t.getAmount().doubleValue()) - new Double(getFee()).doubleValue()),"#######.00");
				//(t.getAmount().doubleValue() - new Double(getFee()).doubleValue())+"";
			}
		}
		
		public static String dealDate(Date date){
			String str="";
			if(date!=null){
				str =date.toString().substring(0,date.toString().length()-2);
			}
			return str;
		}
		
		
//		交易模式
		
		public String getTradeType(){
			if(t.getActionType().getId().toString().equals(Constant.ACTION_TYPE_C)) { 
				return t.getTradeType();
			} else {
				return "";
			}
			
		}
		
		public String getBeginDate() {
			return dealDate(t.getBeginDate());
		}
		public String getEndDate() {
//			if(t.getEndDate()!=null)
//			return dealDate(t.getEndDate());
//			else return "";
			return dealDate(t.getEndDate());
		}
		
		public String getUpdateDate() {
			return DateUtil.date2String((t.getUpdateTime()), "yyyy-MM-dd");
		}
		public void setUpdateDate(String updateDate) {
			this.updateDate = updateDate;
		}
		public String getFemark() {
			return t.getRemark();
		}
		
		
		public Account getA() {
			return a;
		}
		public void setA(Account a) {
			this.a = a;
		}
		

		
		public Transaction getT() {
			return t;
		}
		public void setT(Transaction t) {
			this.t = t;
		}
		public String getActionType() {
			return t.getActionType().getId().toString();
		}
		public void setActionType(String actionType) {
			this.actionType = actionType;
		}
		public AccountBank getAb() {
			return ab;
		}
		public void setAb(AccountBank ab) {
			this.ab = ab;
		}
		/**
		 * 得到银行卡号
		 * @return
		 */
		public String getCardNo() {
			return ab.getAccountId();
		}
		public void setCardNo(String cardNo) {
			this.cardNo = cardNo;
		}
		/**
		 * 帐户直付的卡号
		 * @return
		 */
		public String getDirectCardNo() {
			return t.getCardNo();
		}
		public void setDirectCardNo(String directCardNo) {
			this.directCardNo = directCardNo;
		}
		public String getPersonMail() {
			return t.getPersonMail();
		}
		public void setPersonMail(String personMail) {
			this.personMail = personMail;
		}
		public String getPersonMobile() {
			return t.getPersonMobile();
		}
		public void setPersonMobile(String personMobile) {
			this.personMobile = personMobile;
		}
		public String getPersonName() {
			return t.getPersonName();
		}
		public void setPersonName(String personName) {
			this.personName = personName;
		}
		public String getPersonPhone() {
			return t.getPersonPhone();
		}
		public void setPersonPhone(String personPhone) {
			this.personPhone = personPhone;
		}
		public BankInfo getBi() {
			return bi;
		}
		public void setBi(BankInfo bi) {
			this.bi = bi;
		}
		public String getBankCity() {
			if(city==null) return null;
			return city.getCityName();
		}
		public void setBankCity(String bankCity) {
			this.bankCity = bankCity;
		}
		public String getBankName() {
			return t.getBankName();
		}
		public void setBankName(String bankName) {
			this.bankName = bankName;
		}
		public String getBankProv() {
			if(prov==null)  return null;
			return prov.getCityName();
		}
		public void setBankProv(String bankProv) {
			this.bankProv = bankProv;
		}
		public CityInfo getCity() {
			return city;
		}
		public void setCity(CityInfo city) {
			this.city = city;
		}
		public CityInfo getProv() {
			return prov;
		}
		public void setProv(CityInfo prov) {
			this.prov = prov;
		}
}
